<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>Document</title>
        <style>
            .vm{
                position: absolute;
                left:50%;
                top: 50%;
                transform:translate(-50%,-50%);
            }
            .box{
                padding: 40px;
                background-color: #fc0;
            }
            /*.box{
                width: 400px;
                height: 400px;
                background-color: #fc0;
            } */
            html,body{
                height: 100%;
            }
            .outer{
                display: table;
                width: 100%;
                height: 100%;
                _position: relative;
            }
            .inner{
                display: table-cell;
                vertical-align: middle;
                text-align: center;
                _position: absolute;
                _top: 50%;
                _left: 50%;
            }
            .content{
                *display: inline;
                display: inline-block;
                _position: relative;
                _top: -50%;
                _left: -50%;
            }
        </style>
    </head>
    <body>
        <div class="outer">
            <div class="inner">
                <div class="content box">好好学习，幸福在哪里？</div>
            </div>
        </div>
    </body>
</html>